package com.bao.demo.work.flower.entity;

import java.io.Serializable;
import java.sql.Date;

/**
 * @author baoye
 * @date 2024-08-23/19:02
 */
public class Flower implements Serializable {
    private static final long serialVersionUID = 3514392356728242612L;
    private Integer id;
    private String name;
    private Integer num;
    private Double price;
    private Date buyDate;
    private String emp;
    private String comment;

    @Override
    public String toString() {
        return id+","+name+","+num+","+price+","+buyDate+","+emp+","+comment;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Flower flower = (Flower) o;

        return id != null ? id.equals(flower.id) : flower.id == null;
    }

    @Override
    public int hashCode() {
        return id != null ? id.hashCode() : 0;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public Date getBuyDate() {
        return buyDate;
    }

    public void setBuyDate(Date buyDate) {
        this.buyDate = buyDate;
    }

    public String getEmp() {
        return emp;
    }

    public void setEmp(String emp) {
        this.emp = emp;
    }

    public String getComment() {
        return comment;
    }

    public void setComment(String comment) {
        this.comment = comment;
    }

    public Flower(Integer id, String name, int num, Double price, Date buyDate, String emp, String comment) {
        this.id = id;
        this.name = name;
        this.num = num;
        this.price = price;
        this.buyDate = buyDate;
        this.emp = emp;
        this.comment = comment;
    }

    public Flower() {
    }

    public static void main(String[] args) {

    }
}
